package com.jic.member.controller.rest;

import com.jic.common.base.vo.RestResult;
import com.jic.member.api.rest.MemberGrowthActionApi;
import com.jic.member.request.MemberGrowthActionApiRequest;
import com.jic.member.response.MemberGrowthActionApiResponse;
import com.jic.member.service.MememberGrowthRuleService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rest/growth")
@Api(tags = {"会员成长值接口"})
@Slf4j
public class MememberGrowthOperationController implements MemberGrowthActionApi {

    @Autowired
    private MememberGrowthRuleService mememberGrowthRuleService;


    /**
     * 获取会员[成长值]详情
     * @param memberGrowthActionApiRequest 入参
     * @return 返回单个成长值对象
     * @date 2020-5-26 16:53:10
     * @author tzc
     */
    @RequestMapping("/getMemberGrowthInfo")
//    @Override
    public RestResult<MemberGrowthActionApiResponse> getMemberGrowthInfo(@RequestBody  MemberGrowthActionApiRequest memberGrowthActionApiRequest) {
        return mememberGrowthRuleService.getMemberGrowthInfo(memberGrowthActionApiRequest);
    }


    /**
     * 修改会员[成长值]详情
     * @param memberGrowthActionApiRequest 入参
     * @return 返回单个成长值对象
     * @date 2020-5-26 16:53:10
     * @author tzc
     */
    @RequestMapping("/updateMemberGrowthInfo")
    @Override
    public RestResult<MemberGrowthActionApiResponse> updateMemberGrowthInfo(@RequestBody  MemberGrowthActionApiRequest memberGrowthActionApiRequest) {
        return mememberGrowthRuleService.updateMemberGrowthInfo(memberGrowthActionApiRequest);
    }


    /**
     * 获取会员[成长值]详情
     * @param memberGrowthActionApiRequest 入参
     * @return 返回单个成长值对象
     * @date 2020-5-26 16:53:10
     * @author tzc
     */
    @RequestMapping("/getMemberGrowthList")
    //@Override
    public RestResult<MemberGrowthActionApiResponse> getMemberGrowthList (@RequestBody  MemberGrowthActionApiRequest memberGrowthActionApiRequest) {
        return mememberGrowthRuleService.getMemberGrowthList (memberGrowthActionApiRequest);
    }


}
